import React from 'react'
import { NavBar } from 'antd-mobile'
import { useLocation } from 'react-router-dom'
import { useNavigate } from 'react-router-dom'

export default function FeiXiang() {
    const location = useLocation()
    const item = location.state
    const navigate= useNavigate()

    const back = () => {
        navigate('/fei')
    }
    return (
        <div>
            <NavBar onBack={back}>
                <h3>详情</h3>
            </NavBar>
            <hr/>
            <p style={{fontWeight:'bold',fontSize:'17px',textAlign:'center'}}>{item.name}</p>
            <p style={{fontSize:'16px',marginLeft:'15px',marginTop:'15px',marginBottom:'20px'}}>{item.time}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;来源：新华社</p>
            <div style={{width:'400px',margin:'auto'}}>
               <p style={{fontSize:'16px'}}>{item.content1}</p> 
               <img style={{width:'100%',marginTop:'20px',marginBottom:'20px'}} src={item.img2}/>
               <p style={{fontSize:'16px'}}>{item.content2}</p> 
            </div>
        </div>
    )
}